woocommerce get product price with currency symbol

118

/**
 * Change a currency symbol
 */
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);

function change_existing_currency_symbol( $currency_symbol, $currency ) {
     switch( $currency ) {
          case 'AUD': $currency_symbol = 'AUD$'; break;
     }
     return $currency_symbol;
}
get_option('woocommerce_currency')
$product->get_price_html();

Comments

Submit
0 Comments